-
Notifications
You must be signed in to change notification settings - Fork 2
Migrate to uv build system #85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR migrates the Python packaging infrastructure from the legacy setup.py + pip approach to the modern pyproject.toml + uv build system. This migration follows PEP 517/518/639 standards and aligns with the pattern successfully implemented in keboola/python-http-client.
Key Changes:
- Complete migration to declarative
pyproject.tomlconfiguration - Adoption of
uvfor dependency management and publishing - Updated CI/CD workflows to use uv tooling with blocking ruff checks
- Flake8 configuration improvements following cookiecutter template standards
Reviewed changes
Copilot reviewed 11 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
pyproject.toml |
New project configuration file with metadata, dependencies, and dev dependencies |
uv.lock |
Dependency lock file ensuring deterministic builds across Python 3.8-3.14 |
setup.py |
Removed legacy setup file |
requirements.txt |
Removed in favor of pyproject.toml dependencies |
.flake8 |
New standardized flake8 configuration (renamed from flake8.cfg) |
flake8.cfg |
Removed old configuration file |
LICENSE |
Updated copyright year to 2025 |
tests/test_interface.py |
Line ending normalization (CRLF→LF) and minor unused variable fixes |
tests/test_dao.py |
Fixed star imports, unused variables, and formatting issues |
.github/workflows/deploy.yml |
Updated to use uv for build and publish to PyPI |
.github/workflows/deploy_to_test.yml |
Updated to use uv for Test PyPI publishing |
.github/workflows/push_dev.yml |
Updated to use uv with blocking ruff checks |
.github/workflows/push_main.yml |
Updated to use uv for documentation generation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # def test_file_manifest(self): | ||
| # cfg = docker.Config() | ||
| # some_file = os.path.join(tempfile.mkdtemp('kbc-test') + 'someFile.txt') | ||
| # cfg.write_file_manifest(some_file, file_tags=['foo', 'bar'], | ||
| # is_public=True, is_permanent=False, | ||
| # notify=True) | ||
| # manifest_filename = some_file + '.manifest' | ||
| # with open(manifest_filename) as manifest_file: | ||
| # config = json.load(manifest_file) | ||
| # self.assertEqual( | ||
| # {'is_public': True, 'is_permanent': False, 'notify': True, | ||
| # 'tags': ['foo', 'bar']}, | ||
| # config | ||
| # ) | ||
| # os.remove(manifest_filename) |
Copilot
AI
Jan 6, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment appears to contain commented-out code.
| # def test_file_manifest(self): | |
| # cfg = docker.Config() | |
| # some_file = os.path.join(tempfile.mkdtemp('kbc-test') + 'someFile.txt') | |
| # cfg.write_file_manifest(some_file, file_tags=['foo', 'bar'], | |
| # is_public=True, is_permanent=False, | |
| # notify=True) | |
| # manifest_filename = some_file + '.manifest' | |
| # with open(manifest_filename) as manifest_file: | |
| # config = json.load(manifest_file) | |
| # self.assertEqual( | |
| # {'is_public': True, 'is_permanent': False, 'notify': True, | |
| # 'tags': ['foo', 'bar']}, | |
| # config | |
| # ) | |
| # os.remove(manifest_filename) | |
| # File manifest behavior is not covered by this test suite. |
matyas-jirat-keboola
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@soustruh The changes looks good. Can you fix the failing pipeline before upload? Seems like missing repo secrets.
|
Well, I believe I already did, it just doesn't show up in the pipeline as the publish action was triggered manually… I will try with another tag though 🤞 |
Migrate to uv build system
Summary
Migrate from
setup.py+ pip topyproject.toml+uvbuild system, following the same pattern successfully used in keboola/python-http-client.Testing
Changes
Commit 1: flake8 config consistent with cookiecutter template 🍪
flake8.cfg→.flake8(standard naming)tests/test_dao.py: Fixed star imports (F403/F405), unused variables (F841), formattingtests/test_interface.py: Fixed unused variables (F841), line length (E501), normalized CRLF→LF line endingsCommit 2: migrate package configuration to pyproject.toml 📦
pyproject.tomlwith complete project metadata:pygelf,pytz<2021.0,deprecatedflake8,pytest,ruff,pdoc3License :: OSI Approved :: MIT Licenseclassifier (PEP 639 compliance)setup.pyandrequirements.txtLICENSEcopyright to 2025Commit 3: uv 💜
.github/workflows/deploy.yml- production PyPI.github/workflows/deploy_to_test.yml- Test PyPI (manual workflow_dispatch).github/workflows/push_dev.yml- dev branch testing.github/workflows/push_main.yml- docs generationcontinue-on-error)uv versionUV_PUBLISH_TOKEN,UV_PUBLISH_TOKEN_TEST_PYPIuv.lockwith locked dependencies@v5,@v6)["3.8", "3.14"](min + max)Commit 4: fix production deploy trigger
on: release: types: [published](matches python-http-client)Commit 5: fix disambiguate workflow names
push_dev.yml: "Build & Test (side branches)"push_main.yml: "Build, Test & Generate Docs (main branch)"Version Strategy
Workflow Strategy
workflow_dispatch- allows testing any taggit tag 1.7.X && git push origin 1.7.XBreaking Changes
None - this is purely a build system migration. The published package remains functionally identical.
Migration Notes
uv add keboola.componentuv add --dev keboola.componentBenefits
uv.lockNote on Large Diff in test_interface.py
The file had CRLF (Windows) line endings which were normalized to LF (Unix) during flake8 fixes. Actual code changes are minimal (5 lines: unused variables + comment formatting). This is expected cleanup.
Production Release Process
When ready to release 1.8.0:
1.8.0main1.8.0